<template>
  <div class="topblock">
    <search_playlist_album
      :cover_path="playlist_cover_path"
      :playlist_album_name="playlist_name"
      :author_name="playlist_author_name"
      :isuue_time="playlist_issue_time"
      :playlist_album_info="playlist_info"
      :follow_data="playlist_follow_data"
      :comment_data="playlist_comment_data"
      :list="list"
    />
  </div>
  <div class="page_apart_block">
    <page_apart />
  </div>
</template>

<script>
import page_apart from "../circle_use/page_apart.vue";
import search_playlist_album from "../circle_use/search_playlist_album.vue";
export default {
  name: "search_playlist",
  components: {
    search_playlist_album,
    page_apart,
  },
  data() {
    return {
      playlist_cover_path: "",
      playlist_name: "",
      playlist_author_name: "",
      playlist_issue_time: "",
      playlist_info: "",
      playlist_follow_data: "",
      playlist_comment_data: "",
      list: [],
      flag:2,//歌单
    };
  },
  mounted() {
    this.$http
      .get("/search/playlist", {
        params: {
          keyword: this.$route.query.keyword,
          limit:10,
        },
      })
      .then((res) => {
        if (res.data.data.count === 0) {
          alert("空");
        } else {
          this.list = res.data.data.list;
          this.playlist_cover_path = res.data.data.list[0].cover;
          this.playlist_name = res.data.data.list[0].name;
        }
      });
  },
};
</script>

<style scoped>
.search_playlist_album >>> .cover_box {
  border-radius: 15px;
}
.page_apart_block {
  padding-top: 44px;
}
</style>